package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Objects;

/**
 * @author: qiyr
 * @date: 2022/6/27 15:48
 * @description: 场外债券回购交易报告实体类
 */
@Data
@Entity
@Table(name = "t_reg_rpt_interotc_a2")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RegRptInterOtcA2.PK.class)
public class RegRptInterOtcA2 {

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @Column(name = "submit_org_name")
    private String submitOrgName;

    @Column(name = "submit_term")
    private String submitTerm;

    @Column(name = "submit_time")
    private String submitTime;

    @Id
    @Column(name = "row_id")
    private Integer rowId;

    /**
     * 平台交易所回购
     */
    @Column(name = "pthg_jys")
    private Double pthgJys;

    /**
     * 平台银行间回购
     */
    @Column(name = "pthg_yhj")
    private Double pthgYhj;

    /**
     * 非平台书面协议
     */
    @Column(name = "fpthg_smxy")
    private Double fpthgSmxy;

    /**
     * 非平台无协议
     */
    @Column(name = "fpthg_wxy")
    private Double fpthgWxy;

    /**
     * 表内规模
     */
    @Column(name = "bngm")
    private Double bngm;

    /**
     * 表外规模
     */
    @Column(name = "bwgm")
    private Double bwgm;

    public RegRptInterOtcA2() {
    }

    public RegRptInterOtcA2(BigInteger mainId, String submitOrgName, String submitTerm, String submitTime,
                            Integer rowId, Double pthgJys, Double pthgYhj, Double fpthgSmxy,
                            Double fpthgWxy, Double bngm, Double bwgm) {
        this.mainId = mainId;
        this.submitOrgName = submitOrgName;
        this.submitTerm = submitTerm;
        this.submitTime = submitTime;
        this.rowId = rowId;
        this.pthgJys = pthgJys;
        this.pthgYhj = pthgYhj;
        this.fpthgSmxy = fpthgSmxy;
        this.fpthgWxy = fpthgWxy;
        this.bngm = bngm;
        this.bwgm = bwgm;
    }

    public static class PK implements Serializable {
        private BigInteger mainId;
        private Integer rowId;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public Integer getRowId() {
            return rowId;
        }

        public void setRowId(Integer rowId) {
            this.rowId = rowId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(rowId, pk.rowId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, rowId);
        }
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public String getSubmitOrgName() {
        return submitOrgName;
    }

    public void setSubmitOrgName(String submitOrgName) {
        this.submitOrgName = submitOrgName;
    }

    public String getSubmitTerm() {
        return submitTerm;
    }

    public void setSubmitTerm(String submitTerm) {
        this.submitTerm = submitTerm;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public Double getPthgJys() {
        return pthgJys;
    }

    public void setPthgJys(Double pthgJys) {
        this.pthgJys = pthgJys;
    }

    public Double getPthgYhj() {
        return pthgYhj;
    }

    public void setPthgYhj(Double pthgYhj) {
        this.pthgYhj = pthgYhj;
    }

    public Double getFpthgSmxy() {
        return fpthgSmxy;
    }

    public void setFpthgSmxy(Double fpthgSmxy) {
        this.fpthgSmxy = fpthgSmxy;
    }

    public Double getFpthgWxy() {
        return fpthgWxy;
    }

    public void setFpthgWxy(Double fpthgWxy) {
        this.fpthgWxy = fpthgWxy;
    }

    public Double getBngm() {
        return bngm;
    }

    public void setBngm(Double bngm) {
        this.bngm = bngm;
    }

    public Double getBwgm() {
        return bwgm;
    }

    public void setBwgm(Double bwgm) {
        this.bwgm = bwgm;
    }
}
